#!/usr/bin/perl

# Internetwork Management Program-Tabbed Telenet/SSH client for internetwork management.
# Copyright (C) 2010 Matt O'Brien
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

use warnings;
use strict;

my $yes = 1;
print "\nChecking for Tk... ";
if (eval ("require Tk;")) {
	print "Tk found!\n";
}
else {
	$yes = 0;
	print "Tk not found\n";
	print "This program requires the Tk module.\n";
	print "On most Debian-based systems, this can be installed by typing:\n\n";
	print "	sudo apt-get install perl-tk\n\n";
	print "Otherwise, install Tk from the CPAN by typing:\n\n";
	print "	sudo cpan Tk\n\n";
}

print "\nChecking for Tk::NoteBook... ";
if (eval ("require Tk::NoteBook;")) {
	print "Tk::NoteBook found!\n";
}
else {
	$yes = 0;
	print "Tk::NoteBook not found\n";
	print "This program requires the Tk::NoteBook module.\n";
	print "Install it from the CPAN by typing:\n\n";
	print "	sudo cpan Tk::NoteBook\n\n";
}

print "\nChecking for Net::Telnet::Cisco... ";
if (eval ("require Net::Telnet::Cisco;")) {
	print "Net::Telnet::Cisco found!\n";
}
else {
	$yes = 0;
	print "Net::Telnet::Cisco not found\n";
	print "This program requires the Net::Telnet::Cisco module.\n";
	print "Install it from the CPAN by typing:\n\n";
	print "	sudo cpan Net::Telnet::Cisco\n\n";
}

if ($yes) {
	print "\nYour system is set up to use INMP correctly.  Start it by typing ./client.pl\n\n";
}
